package com.shallowUniverse.dmp.utils;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.shallowUniverse.dmp.entity.Params;

/**
 * @author Shuai Guo
 * @version 1.0
 * @description
 * @date 2021/8/5
 */
public class PageUtil {

    public static <T> IPage<T> build(Params<T> params) {
        IPage<T> page = new Page<>();
        page.setCurrent(params.getCurrent());
        page.setSize(params.getSize());
        return page;
    }
}
